From 5b27032111166746826173d742c2e711918e41fc Mon Sep 17 00:00:00 2001 From: "stekloff@dyn9047022152.beaverton.ibm.com" Date: Thu, 4 May 2006 14:20:11 +0100 Subject: [PATCH] First step to network infrastructure, add a type to XenDomain to identify it as HVM or PV rather than using the config time option. The forthcoming XenNetDevice will need to check. This is also the first step toward running PV and HVM domains at the same time. Signed-off-by: Daniel Stekloff --- tools/xm-test/lib/XmTestLib/XenDomain.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/xm-test/lib/XmTestLib/XenDomain.py b/tools/xm-test/lib/XmTestLib/XenDomain.py index 1779d459ae..d13037f0fe 100644 --- a/tools/xm-test/lib/XmTestLib/XenDomain.py +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py @@ -193,6 +193,12 @@ class XenDomain: self.name = getUniqueName() self.config = config + # Set domain type, either PV for ParaVirt domU or HVM for + # FullVirt domain + if ENABLE_HVM_SUPPORT: + self.type = "HVM" + else: + self.type = "PV" def start(self): @@ -203,6 +209,10 @@ class XenDomain: extra=output, errorcode=ret) + # HVM domains require waiting for boot + if self.getDomainType() == "HVM": + waitForBoot() + def stop(self): prog = "xm" cmd = " shutdown " @@ -225,6 +235,9 @@ class XenDomain: def getId(self): return domid(self.getName()); + def getDomainType(self): + return self.type + class XmTestDomain(XenDomain): @@ -246,11 +259,6 @@ class XmTestDomain(XenDomain): XenDomain.__init__(self, config.getOpt("name"), config=config) - def start(self): - XenDomain.start(self) - if ENABLE_HVM_SUPPORT: - waitForBoot() - def minSafeMem(self): return 32 -- 2.30.2